<template>
    <p>儿子</p>
    <slot :sonName="name">这是儿子</slot>
    <p>{{ name }}</p>

</template>
<script>
export default{
    data(){
        return {
            name: "XiaoMing"
        }
    }
}
</script>